<?php

namespace Plugins\IMApi;

use Plugins\IMApi\Service\BindService;
use Plugins\IMApi\Service\SenderService;
use Swoole\WebSocket\Frame;
use Swoole\WebSocket\Server;

/**
 * WebSocket消息处理接口
 */
interface WebSocketMessageHandlerInterface
{
    /**
     * 消息处理
     *
     * @param Server $server
     * @param Frame $frame
     * @param SenderService $sender
     * @param BindService $bindService
     * @return void
     */
    public function onMessage(Server $server, Frame $frame, SenderService $sender, BindService $bindService): void;
}